package com.ruoyi.publish.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.publish.mapper.BestJenkinsBuildsMapper;
import com.ruoyi.publish.domain.BestJenkinsBuilds;
import com.ruoyi.publish.service.IBestJenkinsBuildsService;

/**
 * 获取新包Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class BestJenkinsBuildsServiceImpl implements IBestJenkinsBuildsService 
{
    @Autowired
    private BestJenkinsBuildsMapper bestJenkinsBuildsMapper;

    /**
     * 查询获取新包
     * 
     * @param id 获取新包主键
     * @return 获取新包
     */
    @Override
    public BestJenkinsBuilds selectBestJenkinsBuildsById(Long id)
    {
        return bestJenkinsBuildsMapper.selectBestJenkinsBuildsById(id);
    }

    /**
     * 查询获取新包列表
     * 
     * @param bestJenkinsBuilds 获取新包
     * @return 获取新包
     */
    @Override
    public List<BestJenkinsBuilds> selectBestJenkinsBuildsList(BestJenkinsBuilds bestJenkinsBuilds) {
        return bestJenkinsBuildsMapper.selectBestJenkinsBuildsList(bestJenkinsBuilds);
    }

    /**
     * 新增获取新包
     * 
     * @param bestJenkinsBuilds 获取新包
     * @return 结果
     */
    @Override
    public int insertBestJenkinsBuilds(BestJenkinsBuilds bestJenkinsBuilds)
    {
        bestJenkinsBuilds.setCreateTime(DateUtils.getNowDate());
        return bestJenkinsBuildsMapper.insertBestJenkinsBuilds(bestJenkinsBuilds);
    }

    /**
     * 修改获取新包
     * 
     * @param bestJenkinsBuilds 获取新包
     * @return 结果
     */
    @Override
    public int updateBestJenkinsBuilds(BestJenkinsBuilds bestJenkinsBuilds)
    {
        return bestJenkinsBuildsMapper.updateBestJenkinsBuilds(bestJenkinsBuilds);
    }

    /**
     * 批量删除获取新包
     * 
     * @param ids 需要删除的获取新包主键
     * @return 结果
     */
    @Override
    public int deleteBestJenkinsBuildsByIds(Long[] ids)
    {
        return bestJenkinsBuildsMapper.deleteBestJenkinsBuildsByIds(ids);
    }

    /**
     * 删除获取新包信息
     * 
     * @param id 获取新包主键
     * @return 结果
     */
    @Override
    public int deleteBestJenkinsBuildsById(Long id)
    {
        return bestJenkinsBuildsMapper.deleteBestJenkinsBuildsById(id);
    }
}
